﻿namespace Sidvall.WorkItemManager.Model.Local.DataPortalManagers
{
    public static partial class WorkItemTypeManager
    {
        static partial void OnBeforeGetItems(IDataPortalManager dataPortalManager, Sidvall.Business.DataPortalContext<Data.IWorkItemType, Sidvall.Data.FetchListCriteria<Data.Fields.WorkItemTypeField, Data.Relations.WorkItemTypeRelation>> dataPortalContext)
        {
            if (dataPortalContext.OperationContext.SortItems == null)
                dataPortalContext.OperationContext.SortItems = new Sidvall.Data.SortItemCollection<Data.Fields.WorkItemTypeField>();
            if (dataPortalContext.OperationContext.SortItems.Count == 0)
            {
                dataPortalContext.OperationContext.SortItems.Add(Data.Fields.WorkItemTypeField.Name, false);
            }
        }
    }
}